package com.ipan.weixin.msg.menu;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜单Bean
 * 
 * @author iPan
 * @version 2013-12-26
 */
public class MenuBean {

	private List<ButtonBean> button;

	public List<ButtonBean> getButton() {
		return button;
	}

	public void setButton(List<ButtonBean> button) {
		this.button = button;
	}

	public synchronized void check() {
		if (button == null) {
			button = new ArrayList<ButtonBean>();
		}
	}

	public void addButton(ButtonBean but) {
		check();
		button.add(but);
	}

	public void addButton(String type, String name, String key, String url) {
		check();
		button.add(new ButtonBean(type, name, key, url));
	}
}
